<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInLeft">
        <div data-th-replace="common/functionDepict"></div>
        <div>
            <div class="row">
                <div class="creat-step-wrap clearfix">
                    <div class="col-sm-4" data-step="0" id="fristStep">
                        <div class="creat-step-bx">
                            <span class="vam fs24 c-4e"><i class="fa fa-hand-pointer-o"></i></span>
                            <div class="creat-step-txt">
                                <h5><span class="fs18 c-222">第一步：基本信息</span></h5>
                                <span class="fs14 c-999">模块的基本信息：名称、专业/科目、类型</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-4 creat-step-current">
                        <div class="creat-step-bx">
                            <span class="vam fs24 c-4e"><i class="fa fa-hand-peace-o"></i></span>
                            <div class="creat-step-txt">
                                <h5><span class="fs18 c-222">第二步：描述信息</span></h5>
                                <span class="fs14 c-999">模块的内容：素材</span>
                            </div>
                        </div>
                    </div>
                </div>
                <!--第二步 开始-->
                <div class="pt10" data-step="2">
                    <div class="col-sm-9">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>填写描述信息</h5>
                            </div>
                            <div class="ibox-content clearfix pt10">
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <div th:if="${couMould['finish']}==1" class="col-sm-8">
                                            <div>
                                                <button class="btn btn-primary" type="button" id="createMaterial"><i class="fa fa-plus"></i>&nbsp;新建素材</button>
                                                <button class="btn btn-primary" type="button" id="selectMaterial"><i class="fa fa-mouse-pointer"></i>&nbsp;选择素材</button>
                                            </div>
                                        </div>
                                        <div class="clearfix"></div>
                                        <div class="row">
                                            <div class="col-sm-10 pt10">
                                                <div class="mt10 no-padding ml10">
                                                    <blockquote th:class="!${#lists.isEmpty(couMould['couMouldMaterialList'])}?'':'hide'" >
                                                        <ul class="list-group" id="materialList">
                                                            <li class="list-group-item" th:each="mouldMaterial : ${couMould['couMouldMaterialList']}" th:attr="data-material-id=${mouldMaterial['materialId']}">
                                                                <span th:if="${couMould['finish']}==1" class="pull-right">
                                                                    <a href="javascript:void(0)" title="移除" class="c-999 fs12">
                                                                        <i class="fa fa-remove"></i>
                                                                    </a>
                                                                </span>
                                                                <span class="fs12">
                                                                    <i class="fa fa-file"></i>&nbsp;&nbsp;
                                                                    <span th:text="${mouldMaterial['couMaterial']['name']}"></span>
                                                                </span>
                                                            </li>
                                                        </ul>
                                                    </blockquote>
                                                    <div th:classappend="${#lists.isEmpty(couMould['couMouldMaterialList'])}?'':'hide'" class="noDataTipsBox">
                                                        <p><span class="c-4e fs16">亲，还没有素材数据~~~</span></p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="hr-line-dashed"></div>
                                    <div class="col-sm-10">
                                        <input type="hidden" id="mouldId" th:value="${couMould['id']}"/>
                                        <button th:if="${couMould['finish']}==1" class="btn btn-primary" type="button" id="save">保存</button>
                                        <button class="btn btn-primary" type="button" id="cancelLast">退后</button>
                                        <button th:if="${couMould['finish']}==2" class="btn btn-primary" type="button" id="returnBtn">返回</button>
                                        <button th:if="${couMould['finish']}==1" class="btn btn-white ml10" type="button" id="cancel">取消</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div data-th-replace="common/importantNotes"></div>
                </div>
            </div>
        </div>
    </div>
    <div data-th-replace="layout/head-footer"></div>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/material/common-create-material-win.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/material/select-material.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/mould/save_mould_material.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script th:inline="javascript" type="text/javascript">
        var finish = [[${couMould['finish']}]];
        var mouldId = [[${couMould['id']}]];
        var subjectIds = [[${couMould['subjectIds']}]];
    </script>
</body>
</html>